package com.dnjn.happiness.survey.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 题目对象 svy_question
 *
 * @author happiness
 * @date 2023-10-24
 */
@Schema(name = "Question", description = "题目")
@Accessors(chain = true)
@Getter
@Setter
@TableName("svy_question")
@ToString
public class Question extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * PK
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "question_id", type = IdType.ASSIGN_ID)
    private Long questionId;


    

    /**
     * select 选择 | pack填空
     */
    @Schema(description = "是否多选 Y-N")
    private String isSelectPack;

    /**
     * 是否多选 Y-N
     */
    @Schema(description = "是否多选 Y-N")
    @Excel(name = "是否多选 Y-N")
    private String isMultipleChoice;

    /**
     * 标题
     */
    @Schema(description = "标题")
    @Excel(name = "标题")
    private String title;

    /**
     * A
     */
    @Schema(description = "A")
    @Excel(name = "A")
    private String optionA;

    @Schema(description = "选项A分值")
    private Integer scoreOptionA;

    /**
     * B
     */
    @Schema(description = "B")
    @Excel(name = "B")
    private String optionB;

    @Schema(description = "选项B分值")
    private Integer scoreOptionB;

    /**
     * C
     */
    @Schema(description = "C")
    @Excel(name = "C")
    private String optionC;

    @Schema(description = "选项C分值")
    private Integer scoreOptionC;

    /**
     * D
     */
    @Schema(description = "D")
    @Excel(name = "D")
    private String optionD;

    @Schema(description = "选项D分值")
    private Integer scoreOptionD;

    /**
     * E
     */
    @Schema(description = "E")
    @Excel(name = "E")
    private String optionE;

    @Schema(description = "选项E分值")
    private Integer scoreOptionE;

    /**
     * F
     */
    @Schema(description = "F")
    @Excel(name = "F")
    private String optionF;

    @Schema(description = "选项F分值")
    private Integer scoreOptionF;

    /**
     * G
     */
    @Schema(description = "G")
    @Excel(name = "G")
    private String optionG;

    @Schema(description = "选项G分值")
    private Integer scoreOptionG;

    /**
     * 选A的占比
     */
    @Schema(description = "选A的占比")
    @TableField(exist = false)
    private String ratioOptionA;

    /**
     * 选B的占比
     */
    @Schema(description = "选B的占比")
    @TableField(exist = false)
    private String ratioOptionB;

    /**
     * 选C的占比
     */
    @Schema(description = "选C的占比")
    @TableField(exist = false)
    private String ratioOptionC;

    /**
     * 选D的占比
     */
    @Schema(description = "选D的占比")
    @TableField(exist = false)
    private String ratioOptionD;
    /**
     * 选E的占比
     */
    @Schema(description = "选E的占比")
    @TableField(exist = false)
    private String ratioOptionE;
    /**
     * 选F的占比
     */
    @Schema(description = "选F的占比")
    @TableField(exist = false)
    private String ratioOptionF;
    /**
     * 选G的占比
     */
    @Schema(description = "选G的占比")
    @TableField(exist = false)
    private String ratioOptionG;

    /**
     * 答案
     */
    @Schema(description = "答案")
    @Excel(name = "答案")
    private String answer;

    /**
     * $column.columnComment
     */
    @Schema(description = "${comment}")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long ordinal;

    /**
     * 问卷id
     */
    @Schema(description = "问卷id")
    @Excel(name = "问卷id")
    private Long surveyId;

    /**
     * $column.columnComment
     */
    @Schema(description = "${comment}")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long siteId;

    /**
     * 是否删除|0-否 1-是|valid
     */
    @Schema(description = "是否删除|0-否 1-是|valid")
    @Excel(name = "是否删除|0-否 1-是|valid")
    private String deleted;
    @Schema(description = "题库id")
    private Long tikuId;

    @TableField(exist = false)
    @Schema(description = "选择题目的id")
    private List<Long> timuIds;

    /**
     * 答题人的答题答案
     */
    @TableField(exist = false)
    private String solution;

    /**
     * 平均分
     */
    @TableField(exist = false)
    private Integer avgScore;

    /**
     * 平均分之上人数
     */
    @TableField(exist = false)
    private Integer avgScoreUpCount;

    /**
     * 平均分之下人数
     */
    @TableField(exist = false)
    private Integer avgScoreLowCount;

    /**
     * 平均分之上占比
     */
    @TableField(exist = false)
    private String avgScoreUpRadio;

    /**
     * 平均分之下占比
     */
    @TableField(exist = false)
    private String avgScoreLowRadio;

    /**
     *
     */
    @Schema(description = "owl;koala;peacock;chameleon;tiger")
    private String answerType;

    /**
     *
     */
    @Schema(description = "number;word")
    private String answerScoreType;

    /**
     *
     */
    @Schema(description = "选项a字母分值")
    private String wordScoreOptionA;

    /**
     *
     */
    @Schema(description = "选项b字母分值")
    private String wordScoreOptionB;

    /**
     *
     */
    @Schema(description = "选项c字母分值")
    private String wordScoreOptionC;

    /**
     *
     */
    @Schema(description = "选项d字母分值")
    private String wordScoreOptionD;

    /**
     *
     */
    @Schema(description = "选项e字母分值")
    private String wordScoreOptionE;

    /**
     *
     */
    @Schema(description = "选项f字母分值")
    private String wordScoreOptionF;

    /**
     *
     */
    @Schema(description = "选项g字母分值")
    private String wordScoreOptionG;


}
